import React from 'react';
import { connect } from 'dva';
import styles from './project.less';
import projectImg from '@/assets/image/dtimage/project.png';
import downIcon from '../../assets/image/xl.svg';

class Project extends React.Component {
  render() {
    const { longestWorkProjectName, longestWorkProjectRate, workType } = this.props
    return (
      <div className={styles.bg}>
        <img className={styles.downIcon} src={downIcon} alt='' />
        <div className={styles.box}>
          <div className={styles.title}><span className={styles.textColor}>{longestWorkProjectName || ''}</span></div>
          <div className={styles.textBox}>
            <div>你一定记忆犹新吧</div>
            <div>2019年，它占据了你总工时的<span className={styles.textColor}>{Number((longestWorkProjectRate || '') * 100).toFixed(1)}%</span></div>
            <div>曾在项目中担任过<span className={styles.textColor}>{workType || ''}</span>的你</div>
            <div className={styles.border}></div>
            <div>新的一年</div>
            <div>又会朝着哪个方向继续努力呢？</div>
          </div>
          <img className={styles.img} src={projectImg} alt=""></img>
        </div>
      </div>
    )
  }
}

export default connect(({ index }) => index.weekly)(Project)